// video store.js

const state = {
    tasks: JSON.parse(localStorage.getItem('videoTasks')) || []
}

const actions = {
    updateTasks({ commit }, tasks) {
        commit('UPDATE_TASKS', tasks)
    }
}

const mutations = {
    UPDATE_TASKS(state, tasks) {
        state.tasks = tasks
        localStorage.setItem('videoTasks', JSON.stringify(tasks))
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}